How to take transpose of matrx in C